<template>
    <div class="input-content">
      <div class="input-label"><span v-if="props.required" style="color:red;">*</span>{{caption}}</div>
      <div class="input-el-content">
        <el-switch
            v-model="inputValue"
            v-bind="props"
            :active-text="active_text"
            :inactive-text="inactive_text"
            @change="mySubmit"
            @blur="myBlur"
        >
        </el-switch>
      </div>
    </div>
</template>
  
  <script>
  import { defineComponent } from "vue";
  // 引入表单子控件的管理类
  import formItemManage from "../controlManage/formItemManage";
  // 引入组件需要的属性
  import { baseFormProps, swticherProps } from "../formItemMeta.js";
  
  export default defineComponent({
    name: "el-from-number",
    props: {
      ...baseFormProps,
      ...swticherProps,
    },
    emits: ["myChange", "input", "change", "blur", "focus"],
    setup(props, context) {
      console.log(props);
      return {
        ...formItemManage(props, context),
      };
    },
  });
</script>

<style scoped>
@import url('./emap-form-item.css');

</style>